The present invention relates to debugging a program running in a Web browser.
A web browser is a software application which enables a user to display and interact with text, images, videos, music and other information located on a Web page at a website on the World Wide Web or a local area network. Text and images on a Web page can contain hyperlinks to other Web pages at the same or different website. Web browsers allow a user to quickly and easily access information provided on many Web pages at many websites by traversing these links.
Client-side scripting generally refers to the class of computer programs on the web that are executed client-side, by the user's web browser, instead of server-side (on the web server). This type of computer programming enables web pages to be scripted; that is, to have different and changing content depending on user input or predefined variables (e.g., time of day). A scripting language is a programming language that controls a software application. Scripting languages are nearly always embedded in the application with which they are associated. Web programmers write client-side scripts in languages such as JavaScript and VBScript.
Client-side scripts are often embedded within an HTML document, but they may also be contained in a separate file which is referenced by the document that uses it. Upon request, the necessary files are sent to the user's computer by the web server on which they reside. The user's web browser executes the script and then displays the document, including any visible output from the script. Client-side scripts may also contain instructions for the browser to follow if the user interacts with the document in a predetermined way (e.g., clicks a predetermined button). These instructions can be followed without further communication with the server, though they may require such communication in some circumstances.
To debug a JavaScript program that is running inside a web browser, its execution needs to be controlled and its state inspected. Traditionally, the JavaScript VM (virtual machine) is enhanced with a proprietary debug engine. Such a proprietary debug engine makes it difficult to debug one single program in various browsers, each having their own debug solution. Successful integration to an integrated development environment (IDE) is also made more difficult as a result. Software development and debugging is typically performed using an IDE. An IDE typically comprises a source code editor, a compiler and/or interpreter, build automation tools, and a debugger.